conf = require("../config")
if not conf.aerial.enabled then return {} end

return {
  'stevearc/aerial.nvim',
  dependencies = {
     "nvim-treesitter/nvim-treesitter",
     -- "nvim-tree/nvim-web-devicons",
    "echasnovski/mini.icons"
  },
  cmd = { "AerialPrev", "AerialNext", "AerialToggle"},
  keys = {
    {"<space>k", "<cmd>AerialPrev<CR>", "n", desc = "AerialPrev"},
    {"<space>j", "<cmd>AerialNext<CR>", "n", desc = "AerialNext"},
    {",aa", "<cmd>AerialToggle!<CR>", "n", desc = "AerialToggle"}
  },
  config = function ()
    require("aerial").setup({
      icons = {
        Text = "󰉿",
        Method = "󰆧",
        Function = "󰊕",
        Constructor = "",
        Field = "󰜢",
        Variable = "󰀫",
        Class = "󰠱",
        Interface = "",
        Module = "",
        Property = "󰜢",
        Unit = "󰑭",
        Value = "󰎠",
        Enum = "",
        Keyword = "󰌋",
        Snippet = "",
        Color = "󰏘",
        File = "󰈙",
        Reference = "󰈇",
        Folder = "󰉋",
        EnumMember = "",
        Constant = "󰏿",
        Struct = "󰙅",
        Event = "",
        Operator = "󰆕",
        TypeParameter = "",
      },
      show_guides = true,
      layout = {
        min_width = 25
      }
    })
  end
}
